package com.wiscamp.ninechapters.problems.enums;

/**
 * 题模式
 */
public enum AssignmentTypes {
    MENTEE(144001, "学员"),

    CLASS(144002, "班级");

    private final int value;

    private final String name;

    AssignmentTypes(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public static AssignmentTypes valueOf(int value) {
        return switch (value) {
            case 144001 -> AssignmentTypes.MENTEE;
            case 144002 -> AssignmentTypes.CLASS;
            default -> null;
        };
    }
}
